﻿<%@ WebHandler Language="C#" Class="_1Handler2" %>

using System;
using System.Web;

public class _1Handler2 : IHttpHandler {
    
    public void ProcessRequest (HttpContext context) {
        context.Response.ContentType = "text/plain";
        string fullPath = context.Server.MapPath("1Hello.htm");//得到文件的全路径
       // context.Response.Write(fullPath);     //读取文件
        string content = System.IO.File.ReadAllText(fullPath);
        context.Response.Write(content);
    }
 
    public bool IsReusable {
        get {
            return false;
        }
    }

}